package www.cslc.com.Game.ui.arrayThree.compound;
import www.cslc.com.Game.ui.arrayThree.common.Abstract_ArrayThree_Simple;
import www.cslc.com.Util.RandomUtil;
@SuppressWarnings("serial")
public class ArrayThree_All_Compound extends Abstract_ArrayThree_Simple{
	@Override
	public void initParm() {
		setGamecode("20");
	}
	@SuppressWarnings("unchecked")
	@Override
	public String getAddToList(){
		ball_list = p1.getBallList();
		blue_ball_list=p2.getBallList();
		yellow_ball_list=p3.getBallList();
		String cont="";
		for(int i=0;i<ball_list.size();i++){
			cont+=ball_list.get(i).getNumValue();
		}
		cont+=",";
		for(int j=0;j<blue_ball_list.size();j++){
			cont+=blue_ball_list.get(j).getNumValue();
		}
		cont+=",";
		for(int k=0;k<yellow_ball_list.size();k++){
			cont+=yellow_ball_list.get(k).getNumValue();
		}
		return cont;
	}
	@Override
	public String getOneBetContent() {
		return RandomUtil.getRandomNums(3, 2)
				+","+RandomUtil.getRandomNums(3, 2)
				  +","+RandomUtil.getRandomNums(3, 2);
	}
	@Override
	public int getBetCount() {
		int result=0;
		for(int i=0;i<getBetResultTableModel().getRowCount();i++){
			String str="";
			for(int j=0;j<getBetResultTableModel().getColumnCount();j++){
				str=getBetResultTableModel().getValueAt(i, j).toString();
			}
			String[] tempStr=str.split(",");
			result+=tempStr[0].length()*tempStr[1].length()*tempStr[2].length();
		}
		return result;
	}

}
